﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using NeurOthello.NNetwork;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;


namespace NeurOthello.Logic
{
    public class NNHeuristic : Heuristic
    {

        PlayerSettings set;
        Random rand = new Random();

        public NNHeuristic(PlayerSettings set) 
        {
            this.set = set;
        }

        public override double Weights(Othello o, int playerID)
        {
            double[] res = set.Network.ProcessInput(o.Inputboard);

            return res[playerID - 1] - res[2 - playerID] + rand.NextDouble();
        }
    }
}
